//
//  IMINetResponse.m
//  IMINet
//
//  Created by Travis on 09-11-23.
//  Copyright 2009 Exmart. All rights reserved.
//

#import "IMINetResponse.h"


@implementation IMINetResponse
@synthesize data,type,MIMEType;

+(id)response{
	return [[[self alloc] init] autorelease];
}

- (id) init
{
	self = [super init];
	if (self != nil) {
		self.data=[NSMutableData data];
		type=IMINetResponseTypeText;
	}
	return self;
}
- (void) setMIMEType:(NSString*)mt{
	MIMEType=[mt lowercaseString];
	if ([MIMEType isEqualToString:@"text/xml"]) {
		type=IMINetResponseTypeXML;
	}else if ([MIMEType isEqualToString:@"image/png"]) {
		type=IMINetResponseTypeXML;
	}else if ([MIMEType isEqualToString:@"text/xml"]) {
		type=IMINetResponseTypeXML;
	}else if ([MIMEType isEqualToString:@"text/xml"]) {
		type=IMINetResponseTypeXML;
	}

	//NSLog(MIMEType);
	
}
-(NSString*)description{
	return [NSString stringWithUTF8String:[data bytes]];
}

@end
